package top.kaoshanji.p1ch04a;

/**
 * 代码清单-p1ch04a-89页a：演示继承原理：main方法
 * author kaoshanji
 * ^_^
 * create time 2025/2/17 16:20
 */
public class Test {

    public static void main(String[] args) {

        System.out.println("------ new Child()");
        Child c = new Child();

        System.out.println("\n------ c.action()");
        c.action();

        Base b = c;
        System.out.println("\n------ b.action()");
        b.action();

        System.out.println("\n---- b.s: " + b.s);
        System.out.println("\n---- c.s: " + c.s);

    }

}
